//
//  Menu1TableViewCell.swift
//  iModern
//
//  Created by 立雄 王 on 15/9/7.
//  Copyright (c) 2015年 com.starlooking. All rights reserved.
//

import UIKit

class Menu1TableViewCell: TableViewCell
{
    
    var activity = NSDictionary()
    

    let __name_label_tag         = 61
    let __commend_label_tag      = 62

    
    override func awakeFromNib()
    {
        super.awakeFromNib()
        // Initialization code
        initNameLabel()
        initCommendLabel()
    }
    
    func setData(data: NSDictionary)
    {
        let cellphone = data["cellphone"] as? String
        if cellphone != nil
        {
            let label = self.viewWithTag(__commend_label_tag) as? UILabel
            label?.text = cellphone!
        }
    }
    
    
    func initNameLabel()
    {
        let screen = UIScreen.mainScreen().bounds
        var label  = self.viewWithTag(__name_label_tag) as? UILabel
        if (label == nil)
        {
            let frame = CGRect(x: 10, y: 5, width: screen.size.width - 110, height: 40)
            label = UILabel(frame: frame)
            label!.font = UIFont.systemFontOfSize(15)
            label!.tag = __name_label_tag
            label?.text = "绑定手机"
            label?.textColor = UIColor.grayColor()
            self.addSubview(label!)
        }
    }
    
    func initCommendLabel()
    {
        let screen = UIScreen.mainScreen().bounds
        var label = self.viewWithTag(__commend_label_tag) as? UILabel
        if (label == nil)
        {
            let frame = CGRect(x: screen.size.width - 130, y: 5, width: 100, height: 40)
            label = UILabel(frame: frame)
            label!.font = UIFont.systemFontOfSize(12)
            label!.tag = __commend_label_tag
            label?.text = "找回密码使用"
            label?.textColor = UIColor.grayColor()
            self.addSubview(label!)
        }
    }
    
    
    
    override func setSelected(selected: Bool, animated: Bool)
    {
        super.setSelected(selected, animated: animated)
        
        // Configure the view for the selected state
    }
    
}

